﻿using YamlDotNet.Serialization;

namespace Hiver.Util.Config.Model
{
    /// <summary>
    /// Sugar单数据库模型（默认）
    /// </summary>
    public class Sugar
    {
        /// <summary>
        /// 数据库连接符
        /// </summary>
        [YamlMember(Alias = "connection", ApplyNamingConventions = false)]
        public string ConnectionString { get; set; }

        /// <summary>
        /// 数据库类型
        /// </summary>
        [YamlMember(Alias = "type", ApplyNamingConventions = false)]
        public string DbType { get; set; }

        /// <summary>
        /// 是否自动关闭连接
        /// </summary>
        [YamlMember(Alias = "closed", ApplyNamingConventions = false)]
        public bool IsAutoCloseConnection { get; set; }
    }
}